//
//  Game.h
//  chuizijiandaobu
//
//  Created by huzhouxin on 10-11-17.
//  Copyright 2010 jiandao. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <AudioToolbox/AudioToolbox.h>
#import <AVFoundation/AVFoundation.h>
#define WIN_TITLE  @"YOU WIN";
#define LOSE_TITLE  @"YOU LOSE";
@interface GameViewController : UIViewController {
	
	UIImageView *containerView;
	
	UIButton *shitouBtn;
	UIButton *jiandaoBtn;
	UIButton *buBtn;
	
	UIButton *resetBtn;
	NSArray *imageList;
	
	UILabel *resultLable;
	
	//动画音效
	AVAudioPlayer *soundPlayer;
	SystemSoundID pinSoundID;
	SystemSoundID winSoundID;
	SystemSoundID loseSoundID;
	SystemSoundID tieSoundID;
	
}


@property (nonatomic,retain)UIImageView *containerView;

@property (nonatomic,retain)UIButton *shitouBtn;
@property (nonatomic,retain)UIButton *jiandaoBtn;
@property (nonatomic,retain)UIButton *buBtn;
@property (nonatomic,retain)UIButton *resetBtn;
@property (nonatomic,retain)NSArray *imageList;
@property (nonatomic,retain)UILabel *resultLable;
@property (nonatomic,retain)IBOutlet AVAudioPlayer *soundPlayer;


-(void)checkRecordFile;
+(NSString *)recordFile;

-(void)initSoundResource;
-(void)playSound;
-(void)stopPlaySound;
-(void)playWinSound;
-(void)playLoseSound;
-(void)playTieSound;
-(void)playPinSound;

-(void)playerWin;
-(void)playerLose;

@end
